/*
 *******************************************************************
 *
 * COPYRIGHT (C) 2013 - 2014 LTV Co., Ltd  All rights reserved
 *
 * Created  : Mar 30, 2014
 * Change History
 * =================================================================
 * DATE                DEVELOPER        REVISION      DESCRIPTION
 * =================================================================
 * Mar 30, 2014        Steven        1.0           First Created.
 * =================================================================
 *
 *
 *******************************************************************/
/**
 * 
 */
package vn.com.ltv.lo.common;

import vn.com.ltv.lo.R;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

/**
 * @author Steven
 *
 */
public class DialogUtil {
	public static Dialog dialog;
	//---------------Create dialog for show message------------------------
	public static void CreateDialog(Context context, String message){	
		TextView dialog_tvMessage;
		Button dialog_btnOK;
		dialog = new Dialog(context, R.style.FullHeightDialog);		
		dialog.setContentView(R.layout.dialog_err);	
		dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
		dialog_tvMessage = (TextView) dialog.findViewById(R.id.dialog_tvMessage);
		dialog_btnOK = (Button) dialog.findViewById(R.id.dialog_btnOK);
		
	
		dialog_tvMessage.setText(message);
		dialog_btnOK.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {			
				dialog.dismiss();
			}
		});
	}

}
